<?php
	session_start();
	include ('../../_js/codebase/connector/scheduler_connector.php');
	include ('../../_inc/config.php');
	
	$res=mysql_connect($server, $user, $pass);
	mysql_select_db($db_name);
	
	$scheduler = new schedulerConnector($res);
	//$scheduler->enable_log("log.txt",true);
	//$scheduler->render_table("events","event_id","start_date,end_date,event_name,details");
	//echo "SELECT * FROM commande AS c, proposition_affretement AS pa WHERE pa.GLN_Transporteur='".$_SESSION['login']."' AND pa.Id_Commande = c.Id_Commande AND c.GLN_Client='".$_GET['id']."'";
    if (isset($_GET['id']))
	 $scheduler->render_sql("SELECT *, cl.Raison_Social FROM commande AS c, proposition_affretement AS pa, client AS cl WHERE pa.GLN_Transporteur='".$_SESSION['login']."' AND pa.Id_Commande = c.Id_Commande AND c.GLN_Client='".$_GET['id']."' AND cl.GLN_Client='".$_GET['id']."'","Id_Commande","Date_fin_Liv,Date_fin_Liv,Raison_Social,Id_Commande");
	else if (isset($_GET['id_cam']))
	 $scheduler->render_sql("SELECT * FROM Tournee WHERE Matricule='".$_GET['id_cam']."'","Id_Tournee","Date_Debut,Date_fin,Id_Tournee,Date_Debut,Date_fin");
?>